const { exec } = require('child_process');
const path = require('path');


const filePath = path.join(__dirname, '../home.html'); 

const open = (filePath) => {
  const platform = process.platform;
  let openCommand;
  if (platform === 'win32') {
    openCommand = 'start';
  } else if (platform === 'darwin') {
    openCommand = 'open';
  } else {
    openCommand = 'xdg-open';
  }
  exec(`${openCommand} ${filePath}`);
};

open(filePath);
